<include file="Public:top" />
<script>

    $(function() {
      $( "#datepicker" ).datepicker({dateFormat: "yy-mm-dd"});
  });  
  function delImages()
  {
    $("#image").html('');
    $("input[name=del_iamge]").val("true");       
  } 
</script>
</head>
<body>
<div id="body-wrapper" > <!-- Wrapper for the radial gradient background --> 
  
  <!--left start--> 
  
  <include file="Public:left" /> 
  <!--left end--> 
  
  <!-- End #sidebar -->
  <div id="main-content"> <!-- Main Content Section with everything -->
  
  <div  id="header_logo">{:C("SITE_INFO.name")}</div>
    
    <!-- Page Head -->
    <div style="float:left; width:380px;">
      <h2><if condition="tep_not_null($titleArr[1])">{$titleArr[1]} <else /> New Banners</if></h2>
    </div>
    <div class="clear"></div>
    <!-- End .clear --> 
    
    <!-- Insert -->
    
      <div class="content-box">       
                    <div class="content-box-header">                    
                         <ul class="content-box-tabs">            
                            <li><a href="#tab1" class="default-tab current" style="text-transform:capitalize">General</a></li>   
                            <li><a href="#tab2" class="" style="display:none">Data</a></li>                       
                        </ul>      
                        <span class="insert" style=" float:right; line-height:40px; font-size:14px; font-weight:bold;"><a href="{:U('index')}">List </a>&nbsp; &nbsp; </span>                                   
                      <div class="clear"></div>         
                    </div>
                    <form action="{:U($action)}" name="insertForm" method="post" enctype="multipart/form-data" >
                    <div class="content-box-content">     
                       <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
                             <div id="sub_tabs">                               
                                  <ul>
                                    <volist name="lang" id="vo" key="k" >                                    
                                      <li><a href="#tabs2-{$vo.value}"><img src="__PUBLIC__/images/{$vo.value}_icon.gif"> {$vo.txt}</a></li>
                                    </volist>   
                                 </ul>
                                 <volist name="langList" id="vo" key="k" >         
                                  <div class="tabs" id="tabs2-{$vo}">                                    
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="editContent">
                                      <tr>
                                        <td class="fieldText">Title:</td><td><input class="text-input small-input" value="{$titleArr[$k]}" style="width:590px!important"  type="text" id="banner_title_{$k}" name="banner_title_{$k}" /></td>
                                      </tr>
                                      <tr>  
                                        <td class="fieldText">Banner Url:</td><td> <input class="text-input small-input" value="{$urlArr[$k]}" style="width:590px!important"  type="text" id="banner_url_{$k}" name="banner_url_{$k}" /></td>
                                      </tr>
                                    </table>    
                                    </div>                                         
                                 </volist>
                            </div>
                            <fieldset style="height: 100%; margin-top: 20px;border:1px soild #ccc">
                              <legend>Data</legend>
                                <p>
                              <label>Image:&nbsp;<span style="color:#F00">(640 x 202px)</span><input type="file" id="banner_image" name="banner_image"></label>                              
                                {$imageShow}                                      
                              </p>
                            
                                <p>
                                  <label>Sort Order:&nbsp;</label>  
                                  <input class="text-input small-input"  type="text" name="sort_order"  value="{$listInfo.sort_order}" />                                                                
                                </p>   
                                <p>
                                  <label>Status:<input type="checkbox" style="vertical-align:middle" name="banner_status"  value="1" <if condition="$listInfo['banner_status'] eq 1">checked="checked"</if>/></label>
                                                                                                   
                                </p>
                            </fieldset>
                      </div> <!-- End #tab1 -->   
                           <div class="tab-content" id="tab2" style="display: none;">
                           
                           <p>
                              <label>Date:&nbsp;</label>  
                              <input class="text-input small-input"  type="text" id="datepicker" name="banner_added" value="{$addDate|strtotime|date='Y-m-d',###}"  />                                                                
                            </p>                  
                         </div> <!-- End #tab2 --> 
                    </div>
                        <div style="padding:0 0 20px 20px"> 
                            <input type="hidden" name="editId" value="{$editId}" >
                            <input class="button" style="text-transform:capitalize" type="button" name="BtnSave" onClick="document.insertForm.submit()"  value="{$actionName}" />&nbsp;&nbsp;
                            <input class="button" type="button" name="back" onClick="window.location.href='{:U('index')}'"  value="Back" />      
                           <!-- 	<input class="button" type="button" name="back" onClick="javascript:toView();"/> -->
                            </form>                     
                        </div>  
                    </form> 
                </div> 
  
    <!--End Insert -->
    
    <div class="clear"></div>
    
    <!-- Start Notifications --> 
    
    <!-- End Notifications -->
    
    <div id="footer"> <small> <!-- Remove this notice or replace it with whatever you want --> 
      &#169; Copyright 2013 </small> </div>
    
    <!-- End #footer --> 
    
  </div>
  <!-- End #main-content --> 
  
</div>
<script>
      $(function(){
          $('.content-box-content ul.tab-content').hide(); // 先隐藏DIV
          $('ul.content-box-tabs li a.default-tab').addClass('current'); // 给默认的选项卡加样式
          $('.content-box-content ul.default-tab').show(); //
           
          $('ul.content-box-tabs li a').click( //
          function() {
            $(this).parent().siblings().find("a").removeClass('current'); //
            $(this).addClass('current'); //
            var currentTab = $(this).attr('href'); //
            $(currentTab).siblings().hide(); //
            $(currentTab).show(); //
            return false;
          }
      );
       $( "#sub_tabs" ).tabs();  
    });
    
      function toView(){
    	  
      }
    </script>

</body>
<!-- Download From www.exet.tk-->
</html>